package com.ruoyi.system.controller;


import com.ruoyi.common.core.web.domain.AjaxResult;
import com.ruoyi.common.security.annotation.RequiresPermissions;
import com.ruoyi.system.domain.Video;
import com.ruoyi.system.service.IVideoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import javax.servlet.http.HttpServletRequest;

@RestController
@RequestMapping("video")
public class VideodetialController {

    @Autowired
    private IVideoService videoService;

    /**
     * 获取视频详细信息
     * author：戴泽杨
     */
    @RequestMapping(path = "videoInfo",method = RequestMethod.GET)
    @ResponseBody
    public AjaxResult getInfo(HttpServletRequest request)
    {
        Long videoId = Long.valueOf(request.getParameter("videoId"));
        return AjaxResult.success(videoService.selectVideoByVideoId(videoId));
    }
}
